package com.pudding.entity.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentLoopMerge;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Author Pudding
 * @Date 2025/3/20 17:31
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExcelVO {

    //@ContentLoopMerge(eachRow = 2)  //每两行进行合并
    @ExcelProperty(value = "ID", index = 0)
    @ColumnWidth(18)  //这个注解设置excel列表的列宽
    private Long id; //主键，由uuid生成

    @ExcelProperty(value = "字符串列", index = 1)
    private String strCol; //字符串列

    @ExcelProperty(value = "浮点数字列", index = 2)
    @ColumnWidth(18)  //这个注解设置excel列表的列宽
    private BigDecimal decCol; //浮点数字列

    @ExcelProperty(value = "日期时间列", index = 3)
    @ColumnWidth(20)  //这个注解设置excel列表的列宽
    private LocalDateTime datetimeCol;  //日期时间列
}
